package groupon.com.util;

import groupon.common.service.SystemService;
import groupon.common.util.AppConfiguration;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;

public abstract class BoNavigation {
	
	@Autowired
	private SystemService _systemService;
	
	@ModelAttribute
	public void newRequest(ModelMap model){
		model.addAttribute("navigation", _systemService.getSystemNavigation());
		model.addAttribute("tab", getTab());
		model.addAttribute("subTab", getSubTab());
		model.addAttribute("appContext", AppConfiguration.getAppContext());
	}

	public abstract String getSubTab(); 
	public abstract String getTab(); 
}
